﻿<Window x:Class="DFBackupAssistant.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Dwarf Fortress Backup Assistant" Width="280" Loaded="Window_Loaded"
        ResizeMode="CanMinimize" Height="286" MaxHeight="380"
        Icon="/DFBackupAssistant;component/525_DiskDrive.ico"
        WindowStartupLocation="CenterScreen">
    <DockPanel>
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="_File">
                <MenuItem Header="Launch _Dwarf Fortress" Click="menuLaunchDF_Click"/>
                <MenuItem Header="_Refresh Save Listing" Click="PopulateSaveGames"/>
                <MenuItem Header="R_efresh Backup Listing" Click="PopulateBackups"/>
                <MenuItem Header="_Browse Save Directory" Click="BrowseSaveDirectory" />
                <Separator />
                <MenuItem Header="E_xit" Click="menuExit_Click" />
            </MenuItem>
            <MenuItem Header="_Preferences">
                <MenuItem Header="_Locate Dwarf Fortress.exe" Click="LocateDF2010"/>
                <MenuItem Header="_Select Backup Destination Folder" Click="LocateBackupDirectory" />
            </MenuItem>
        </Menu>
        <TabControl DockPanel.Dock="Top">
            <TabItem Header="Backup">
                <StackPanel>
                    <ComboBox Name="comboSaveSelect" Margin="3" SelectionChanged="UpdateBackupFilenameTextBox" />
                    <Button Content="_Back Up" Name="buttonBackup" Click="buttonBackup_Click" Margin="3" />
                    <CheckBox Content="_Timestamp Archive" Name="checkBoxTimestampArchive" IsChecked="True" Margin="3" Checked="UpdateBackupFilenameTextBox" Unchecked="UpdateBackupFilenameTextBox" />
                    <CheckBox Content="_Erase Save After Backup" Name="checkBoxEraseAfter" Margin="3" />
                    <Label Content="Backup Filename:"/>
                    <TextBox Name="textBoxBackupFilename" IsReadOnly="True" Margin="3" IsEnabled="False" />
                    <Label Content="Currently Backing Up To:" />
                    <TextBox Name="textBoxBackUpTo" IsReadOnly="True" Margin="3" IsEnabled="True" />
                </StackPanel>
            </TabItem>
            <TabItem Header="Restore">
                <StackPanel>
                    <ComboBox Name="comboBackupSelect" Text="Select a backup file:" SelectionChanged="comboBackupSelect_SelectionChanged" Margin="3" />
                    <Button Content="_Restore" Name="buttonRestore" Click="buttonRestore_Click" Margin="3" />
                    <Label Content="Restore _As:" Name="label1" Margin="3" />
                    <TextBox Name="textBoxRestoreAs" Margin="3" />
                    <CheckBox Content="_Overwrite Without Prompting" Grid.Row="3" Name="checkBoxRestoreOverwrite" Margin="3" />
                    <Label Content="Currently Restoring To:" />
                    <TextBox Name="textBoxRestoreTo" Margin="3" IsReadOnly="True" IsEnabled="True" />
                </StackPanel>
            </TabItem>
            <TabItem Header="DF Settings" IsEnabled="False" Visibility="Collapsed">
                <StackPanel>
                    <Label Content="Autosave Type:" Height="28" Name="labelAutosaveType" />
                    <ComboBox Name="comboAutosaveType" Margin="3" />
                    <CheckBox Content="Auto-Backup" Height="16" Name="checkBoxAutoBackup" Margin="3" IsEnabled="False" />
                    <CheckBox Content="Compress Saves" Height="16" Name="checkBoxCompressSaves" Margin="3" ToolTip="Change this to NO if you want to leave save uncompressed (you might want to do this if you are experience save corruption)." />
                    <CheckBox Content="Save On Embark" Height="16" Name="checkBoxInitialSave" Margin="3" ToolTip="Set this to YES if you want it to save the game when you start a new fortress." />
                    <CheckBox Content="Pause On Autosave" Height="16" Name="checkBoxPauseOnAutosave" Margin="3" ToolTip="Set AUTOSAVE_PAUSE to YES if you want the game to pause every time it autosaves." />
                    <CheckBox Content="Pause On Load" Height="16" Name="checkBoxPauseOnLoad" Margin="3" ToolTip="Set this to NO to make Dwarf Fortress remain in the saved pause state when you load an active game." />
                </StackPanel>
            </TabItem>
        </TabControl>
    </DockPanel>
</Window>
